{include file="public/header" /}
<!--main content start-->
<section class="main-content-wrapper">
    <section id="main-content">
        <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">修改</h3>
                </div>
                <div class="panel-body">
                <form action="/admin/page/page_save" method="post" enctype="multipart/form-data" class="form-horizontal form-border">
                    <input name="id" value="{$id|default=''}" type="hidden">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单页标题：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" id="title" name="title" autocomplete="off" value="{$title|default=''}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单页关键词：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="keywords" placeholder="以英文,分割关键词" value="{$keywords|default=''}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单页描述：</label>
                        <div class="col-sm-4">
                            <textarea class="form-control" name="describe">{$describe|default=''}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label label-input-sm">单页内容：</label>
                        <div class="col-sm-8">
                            <script id="editor" type="text/plain" style="width:500px;height:300px;">{$content|default=''}</script>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单页阅读数：</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" name="read_num" value="{$read_num|default='100'}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">发布时间：</label>
                        <div class="col-sm-8">
                            <div class="col-md-5 grid_box1 input-append date form_datetime4" style="padding-left: 0;">
                                <input type="text" class="form-control" name="time" value="<?php if(!empty($upd_time)) echo (date('Y-m-d H:i',$upd_time));else echo (date('Y-m-d H:i',time()));  ?>" style="width: 70%;float: left;">
                                <div>
                                    <span class="add-on"><i class="icon-remove"></i></span>
                                    <span class="add-on"><i class="icon-th"></i></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">seo标题：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" placeholder="请填写英文" name="seo_name_en" value="{$seo_name_en|default=''}">
                        </div>
                    </div>
                    <div class="panel-body">
                        <button type="submit" class="btn btn_5 btn-lg btn-default w_update">发布</button>
                    </div>
                </form>
                </div>
            </div>
        </div>
        </div>
    </section>
</section>
<style>
    @media (min-width: 768px){
        .form-horizontal .control-label {
             text-align: left;
        }
    }
    /*时间插件*/
    .add-on{display:inline-block;width:auto;height:36px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:32px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}
    .input-prepend .add-on:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}
    .input-append .add-on{margin-left: -4px;}
    .input-append .add-on:last-child{margin-left:-4px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}
    [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("http://cdn.bootcss.com/twitter-bootstrap/2.2.2/img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}
    .icon-th{background-position:-240px 0}
    .icon-remove{background-position:-312px 0}
    @media screen and (max-width: 850px) {
        .add-on {
            display: table-cell
        }
    }
    #seo_title{
        position: absolute;
        z-index: 9;
        width: 89%;
        margin: 0;
        padding: 6px 0;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 4px;
        top: 35px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        -webkit-text-overflow: ellipsis;
        display: none;
    }
    #seo_title li{
        height: 30px;
        line-height: 30px;
        cursor: pointer;
        border-bottom: 1px solid #ccc;
        padding: 0 12px;
    }
    #seo_title li:hover{
        background-color: #c6c7c7;
        color: #fff;
    }
</style>

<!--百度编辑器插件-->
<script type="text/javascript" charset="utf-8" src="/web_admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/web_admin/ueditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/web_admin/ueditor/lang/zh-cn/zh-cn.js"></script>

<!--时间插件-->
<script src="/web_admin/js/bootstrap-datetimepicker.min.js"></script>
<link href="/web_admin/css/datetimepicker.css" rel='stylesheet' type='text/css' />



<script>
    $(".form_datetime4").datetimepicker({
        format: "yyyy-mm-dd hh:ii",
        autoclose: true,
        todayBtn: true
    });
</script>
<script>
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');
</script>
<script>
    /**
     * 从 file 域获取 本地图片 url
     */
    function getFileUrl(sourceId) {
        var url;
        if (navigator.userAgent.indexOf("MSIE")>=1) { // IE
            url = document.getElementById(sourceId).value;
        } else if(navigator.userAgent.indexOf("Firefox")>0) { // Firefox
            url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
        } else if(navigator.userAgent.indexOf("Chrome")>0) { // Chrome
            url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
        }
        return url;
    }
    /**
     * 将本地图片 显示到浏览器上
     */
    function preImg(sourceId, targetId) {
        var url = getFileUrl(sourceId);
        var imgPre = document.getElementById(targetId);
        imgPre.src = url;
    }
</script>
<!--main content end-->
{include file="public/footer" /}